<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>测试报告</title>
    <meta name="generator" content="HTMLTestRunner 0.9.1"/>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    
<style type="text/css" media="screen">
    body        { font-family: verdana, arial, helvetica, sans-serif; font-size: 80%; }
    table       { font-size: 100%; }
    pre         { white-space: pre-wrap;word-wrap: break-word; }

    /* -- heading ---------------------------------------------------------------------- */
    h1 {
        font-size: 16pt;
        color: gray;
    }
    .heading {
        margin-top: 0ex;
        margin-bottom: 1ex;
    }

    .heading .attribute {
        margin-top: 1ex;
        margin-bottom: 0;
    }

    .heading .description {
        margin-top: 2ex;
        margin-bottom: 3ex;
    }

    /* -- css div popup ------------------------------------------------------------------------ */
    a.popup_link {
    }

    a.popup_link:hover {
        color: red;
    }

    .popup_window {
        display: none;
        position: relative;
        left: 0px;
        top: 0px;
        /*border: solid #627173 1px; */
        padding: 10px;
        /* */
        font-family: "Lucida Console", "Courier New", Courier, monospace;
        text-align: left;
        font-size: 8pt;
        /* width: 500px;*/
    }

    }
    /* -- report ------------------------------------------------------------------------ */
    #show_detail_line {
        margin-top: 3ex;
        margin-bottom: 1ex;
    }
    #result_table {
        width: 99%;
    }
    #header_row {
        font-weight: bold;
        color: #303641;
        
    }
    #total_row  { font-weight: bold; }
    .passClass  { background-color: #bdedbc; }
    .failClass  { background-color: #ffefa4; }
    .errorClass { background-color: #ffc9c9; }
    .passCase   { color: #6c6; }
    .failCase   { color: #FF6600; font-weight: bold; }
    .errorCase  { color: #c00; font-weight: bold; }
    .hiddenRow  { display: none; }
    .testcase   { margin-left: 2em; }


    /* -- ending ---------------------------------------------------------------------- */
    #ending {
    }

    #div_base {
                position:absolute;
                top:0%;
                left:5%;
                right:5%;
                width: auto;
                height: auto;
                margin: -15px 0 0 0;
    }
</style>

    <link href="http://cdn.bootcss.com/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
    <!-- <script type="text/javascript" src="https://cdn.bootcss.com/echarts/3.8.5/echarts.common..min.js"></script>-->
    <script src="https://cdn.bootcss.com/echarts/3.8.5/echarts.common.min.js"></script>
</head>
<body>

    <script language="javascript" type="text/javascript"><!--
    output_list = Array();

    /* level - 0:Summary; 1:Failed; 2:All */
    function showCase(level) {
        trs = document.getElementsByTagName("tr");
        for (var i = 0; i < trs.length; i++) {
            tr = trs[i];
            id = tr.id;
            if (id.substr(0,2) == 'ft') {
                if (level < 1) {
                    tr.className = 'hiddenRow';
                }
                else {
                    tr.className = '';
                }
            }
            if (id.substr(0,2) == 'pt') {
                if (level > 1) {
                    tr.className = '';
                }
                else {
                    tr.className = 'hiddenRow';
                }
            }
        }
    }


    function showClassDetail(cid, count) {
        var id_list = Array(count);
        var toHide = 1;
        for (var i = 0; i < count; i++) {
            tid0 = 't' + cid.substr(1) + '.' + (i+1);
            tid = 'f' + tid0;
            tr = document.getElementById(tid);
            if (!tr) {
                tid = 'p' + tid0;
                tr = document.getElementById(tid);
            }
            id_list[i] = tid;
            if (tr.className) {
                toHide = 0;
            }
        }
        for (var i = 0; i < count; i++) {
            tid = id_list[i];
            if (toHide) {
                document.getElementById('div_'+tid).style.display = 'none'
                document.getElementById(tid).className = 'hiddenRow';
            }
            else {
                document.getElementById(tid).className = '';
            }
        }
    }


    function showTestDetail(div_id){
        var details_div = document.getElementById(div_id)
        var displayState = details_div.style.display
        // alert(displayState)
        if (displayState != 'block' ) {
            displayState = 'block'
            details_div.style.display = 'block'
        }
        else {
            details_div.style.display = 'none'
        }
    }


    function html_escape(s) {
        s = s.replace(/&/g,'&amp;');
        s = s.replace(/</g,'&lt;');
        s = s.replace(/>/g,'&gt;');
        return s;
    }
    /* obsoleted by detail in <div>
    function showOutput(id, name) {
        var w = window.open("", //url
                        name,
                        "resizable,scrollbars,status,width=800,height=450");
        d = w.document;
        d.write("<pre>");
        d.write(html_escape(output_list[id]));
        d.write("\n");
        d.write("<a href='javascript:window.close()'>close</a>\n");
        d.write("</pre>\n");
        d.close();
    }
    */
    --></script>

    <div id="div_base">
        
    <div class='page-header'>
        <h1>测试报告</h1>
    <p class='attribute'><strong>开始时间:</strong> 2021-11-12 17:20:03</p>
<p class='attribute'><strong>运行时长:</strong> 0:00:04.369065</p>
<p class='attribute'><strong>状态:</strong> 通过 36</p>

    </div>
    <!--<div style="float: left;width:50%;"><p class='description'>用例执行情况</p></div>-->
    <div id="chartline" style="width:50%;height:400px;float:left;"></div>
    <div id="chart"style="width:50%;height:400px;float:right;"></div>

        
    <div class="btn-group btn-group-sm">
         <!-- <button class="btn btn-default" onclick='javascript:showCase(0)'>总结</button> -->
        <!--<button class="btn btn-default" onclick='javascript:showCase(1)'>失败</button>-->
        <!--<button class="btn btn-default" onclick='javascript:showCase(2)'>全部</button>-->
        <a class="btn btn-primary" onclick='javascript:showCase(0)'>概要 100.00% </a>
        <a class="btn btn-warning" onclick='javascript:showCase(4)'>错误 0 </a>
        <a class="btn btn-danger" onclick='javascript:showCase(1)'>失败  0 </a>
        <a class="btn btn-success" onclick='javascript:showCase(2)'>通过 36 </a>
        <a class="btn btn-info" onclick='javascript:showCase(3)'>所有 36 </a>  

    </div>
    <p></p>
    <table id='result_table' class="table table-bordered">
        <colgroup>
            <col align='left' />
            <col align='right' />
            <col align='right' />
            <col align='right' />
            <col align='right' />
            <col align='right' />
        </colgroup>
        <tr id='header_row'>
            <td>测试套件/测试用例</td>
            <td>总数</td>
            <td>通过</td>
            <td>失败</td>
            <td>错误</td>
            <td>查看</td>
            <th>错误截图</th>
        </tr>
        
    <tr class='passClass'>
        <td>计算中心.计算组.test_addCalaGroupAndRela.TestAddCalcGroupAndRela</td>
        <td>12</td>
        <td>12</td>
        <td>0</td>
        <td>0</td>
        <td><a href="javascript:showClassDetail('c1',12)">详情</a></td>
        <td>&nbsp;</td>
    </tr>

<tr id='pt1.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_C01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_C02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E03</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.6' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E04</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.7' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E05</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.8' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E06</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.9' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E07</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.10' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E08</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.11' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E09</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt1.12' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E10</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

    <tr class='passClass'>
        <td>计算中心.计算组.test_deleteCalcGroup.TestDeleteCalcGroup</td>
        <td>3</td>
        <td>3</td>
        <td>0</td>
        <td>0</td>
        <td><a href="javascript:showClassDetail('c2',3)">详情</a></td>
        <td>&nbsp;</td>
    </tr>

<tr id='pt2.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_delete_C01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt2.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_delete_E01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt2.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_delete_E02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

    <tr class='passClass'>
        <td>计算中心.计算组.test_modifyCalcGroupAndRela.TestModifyCalcGroup</td>
        <td>5</td>
        <td>5</td>
        <td>0</td>
        <td>0</td>
        <td><a href="javascript:showClassDetail('c3',5)">详情</a></td>
        <td>&nbsp;</td>
    </tr>

<tr id='pt3.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_C01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt3.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_C02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt3.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt3.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt3.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E03</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

    <tr class='passClass'>
        <td>设备中心.设备模拟量.test_addDeviceAnalogRel.TestAddDeviceAnalogRela</td>
        <td>7</td>
        <td>7</td>
        <td>0</td>
        <td>0</td>
        <td><a href="javascript:showClassDetail('c4',7)">详情</a></td>
        <td>&nbsp;</td>
    </tr>

<tr id='pt4.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_C01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt4.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_C02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt4.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt4.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt4.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E03</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt4.6' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E04</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt4.7' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_add_E05</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

    <tr class='passClass'>
        <td>设备中心.设备模拟量.test_deleteDeviceAnalogRel.TestDeleteDeviceAnalogRela</td>
        <td>2</td>
        <td>2</td>
        <td>0</td>
        <td>0</td>
        <td><a href="javascript:showClassDetail('c5',2)">详情</a></td>
        <td>&nbsp;</td>
    </tr>

<tr id='pt5.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_delete_E01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt5.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_delete_E02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

    <tr class='passClass'>
        <td>设备中心.设备模拟量.test_modifyDeviceAnalogRel.TestModifyDeviceAnalogRela</td>
        <td>7</td>
        <td>7</td>
        <td>0</td>
        <td>0</td>
        <td><a href="javascript:showClassDetail('c6',7)">详情</a></td>
        <td>&nbsp;</td>
    </tr>

<tr id='pt6.1' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_C01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt6.2' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_C02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt6.3' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E01</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt6.4' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E02</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt6.5' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E03</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt6.6' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E04</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

<tr id='pt6.7' class='hiddenRow'>
    <td class='none'><div class='testcase'>test_modify_E05</div></td>
    <td colspan='5' align='center'>通过</td>
</tr>

        <tr id='total_row'>
            <td>总计</td>
            <td>36</td>
            <td>36</td>
            <td>0</td>
            <td>0</td>
            <td>&nbsp;</td>
            <th>&nbsp;</th>
        </tr>
    </table>

        <div id='ending'>&nbsp;</div>
        
        <script type="text/javascript">
        var myChartline = echarts.init(document.getElementById('chartline'));
        var optionline = {
                tooltip: {
                trigger: 'axis',
                axisPointer: {
                    type: 'cross',
                    crossStyle: {
                        color: '#999'
                    }
                }
            },
            toolbox: {
                feature: {
                    dataView: {show: true, readOnly: false},
                    magicType: {show: true, type: ['line', 'bar']},
                    restore: {show: true},
                    saveAsImage: {show: true}
                }
            },
            legend: {
                data:['错误','成功','失败']
            },
            xAxis: [
                {
                    type: 'category',
                    data: [' 第一次','第二次','第三次','第四次','第五次','第六次','第七次','第八次','第九次','第十次'],
                    axisPointer: {
                        type: 'shadow'
                    }
                }
            ],
            yAxis: [
                {
                    type: 'value',
                    name: '用例条数',
                    min: 0,
                    max: 100,
                    interval: 10,
                    axisLabel: {
                        formatter: '{value} 条'
                    }
                },
                {
                    type: 'value',
                    name: '用例条数',
                    min: 0,
                    max: 100,
                    interval: 10,
                    axisLabel: {
                        formatter: '{value} 条'
                    }
                }
            ],
            series: [
                {
                    name:'成功',
                    type:'bar',
                    data:[36]
                //data:[2.0, 4.9, 7.0, 23.2, 25.6, 76.7, 135.6, 162.2, 32.6, 20.0, 6.4, 3.3]
                },
                {
                    name:'失败',
                    type:'bar',
                    data:[0]
                },
                {
                    name:'错误',
                    type:'bar',
                    yAxisIndex: 1,
                    data:[0]
                    //data:[2.0, 2.2, 3.3, 4.5, 6.3, 10.2, 20.3, 23.4, 23.0, 16.5, 12.0, 6.2]
                }
            ]
        };
        myChartline.setOption(optionline);
        console.log(0,36,0)
            // 基于准备好的dom，初始化echarts实例
            var myChart = echarts.init(document.getElementById('chart'));

            // 指定图表的配置项和数据
            var option = {
                title : {
                    text: '测试执行情况',
                    x:'center'
                },
                tooltip : {
                    trigger: 'item',
                    formatter: "{a} <br/>{b} : {c} ({d}%)"
                },
                legend: {
                    orient: 'vertical',
                    left: 'left',
                    data: ['通过','失败','错误']
                },
                series : [
                    {
                        name: '测试执行情况',
                        type: 'pie',
                        radius : '60%',
                        center: ['50%', '60%'],
                        data:[
                            {value:36, name:'通过'},
                            {value:0, name:'失败'},
                            {value:0, name:'错误'}
                        ],
                        itemStyle: {
                            emphasis: {
                                shadowBlur: 10,
                                shadowOffsetX: 0,
                                shadowColor: 'rgba(0, 0, 0, 0.5)'
                            }
                        }
                    }
                ]
            };

            // 使用刚指定的配置项和数据显示图表。
            myChart.setOption(option);
        </script>
    

    </div>
</body>
</html>
